#!/data/Software/mydan/perl/bin/perl -I/data/Software/mydan/JOBX/lib -I/data/Software/mydan/JOBX/private/lib
use strict;
use warnings;
use MYDB;
use POSIX;
use FindBin qw( $RealBin );
use Data::Dumper;
use Code;

use MYDan::Util::OptConf;

=head1 SYNOPSIS

 $0 [--fromuuid uuid] [--touuid uuid]
    --deploy release-001   ( #default fromuuid )
    --rollback release-001 ( #default fromuuid )

    --choicenorollback

    --starttime 1618888642 ( #default from fromuuid)

    --rename _ci_1_

=cut
my $option = MYDan::Util::OptConf->load();
my %o = $option->get( qw( fromuuid=s touuid=s deploy=s rollback=s choicenorollback starttime=i rename=s ) )->dump();

$option->assert( 'fromuuid', 'touuid' );

my $db = MYDB->new( "$RealBin/../conf/conn" );
Code->new( 'expand' )->run( db => $db, %o );
